package com.asr.testclient.model;

/**
 * 音频信息数据模型
 * 存储音频文件的采样率和位深度信息
 */
public class AudioInfo {
    private final int sampleRate;
    private final int bitDepth;
    private final int channels;

    public AudioInfo(int sampleRate, int bitDepth, int channels) {
        this.sampleRate = sampleRate;
        this.bitDepth = bitDepth;
        this.channels = channels;
    }

    public int getSampleRate() {
        return sampleRate;
    }

    public int getBitDepth() {
        return bitDepth;
    }

    public int getChannels() {
        return channels;
    }

    @Override
    public String toString() {
        return String.format("%d位 %.1fkHz %s", 
            bitDepth, 
            sampleRate / 1000.0,
            channels == 1 ? "单声道" : channels == 2 ? "立体声" : channels + "声道");
    }
}
